<template>
  <div class="container">
    <div class="eventBox">
      <div class="eventItem" style="background-color: #3188FE;">
        <div class="eventIcon">
          <i class="el-icon-pie-chart"></i>
        </div>
        <div class="eventCount">
          <span style="font-size: 60px; font-weight: 600;">0</span>
          <span>隐患总数</span>
        </div>
      </div>
      <div class="eventItem" style="background-color: #84C446;">
        <div class="eventIcon">
          <i class="el-icon-s-order"></i>
        </div>
        <div class="eventCount">
          <span style="font-size: 60px; font-weight: 600;">0</span>
          <span>待处理</span>
        </div>
      </div>
      <div class="eventItem" style="background-color: #4FC5EA;">
        <div class="eventIcon">
          <i class="el-icon-s-order"></i>
        </div>
        <div class="eventCount">
          <span style="font-size: 60px; font-weight: 600;">0</span>
          <span>处理中</span>
        </div>
      </div>
      <div class="eventItem" style="background-color: #3699A8;">
        <div class="eventIcon">
          <i class="el-icon-s-order"></i>
        </div>
        <div class="eventCount">
          <span style="font-size: 60px; font-weight: 600;">0</span>
          <span>已处理</span>
        </div>
      </div>
    </div>
    <!--  -->
    <div class="dataBox">
      <div class="dataLeft">
        <div class="dataHead">
          <span :class="navIndex === 1? 'checkedNav':'noCheckedNav'" @click="changeNav(1)">代办流程</span>
          <span style="border-left: 1px solid #ccc;"></span>
          <span :class="navIndex === 2? 'checkedNav':'noCheckedNav'" @click="changeNav(2)">未配置流程</span>
        </div>
        <div class="hiddenDanger">
          <div class="addHiddenDanger">
            <i class="el-icon-plus"></i>
            <span>添加隐患</span>
          </div>
          <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page.sync="currentPage1"
      :page-size="100"
      layout="total, prev, pager, next"
      :total="0">
    </el-pagination>
        </div>
      </div>
      <div class="dataRight">
        <div class="head">隐患来源统计</div>
        <div id="main"></div>
      </div>
    </div>
    <!--  -->
    <!-- <div id="main1"></div> -->
  </div>
</template>

<script>
import '@/components/index'
// import "@/components/map"
export default {
  data() {
      return {
        currentPage1: 1,
        navIndex: 1
      };
    },
  methods: {
      handleSizeChange(val) {
        console.log(`每页 ${val} 条`);
      },
      handleCurrentChange(val) {
        console.log(`当前页: ${val}`);
      },
      changeNav(index) {
      console.log(index)
      this.navIndex = index
    }
    },
    
}
</script>

<style lang="less" scoped>
  .container{
    padding: 0 20px;
    margin: 0;
    box-sizing: border-box;
    width: 100%;
    border: 1px solid #F3F5F8;
  }
  .eventBox{
    display: flex;
    height: 250px;
    width: 100%;
    box-sizing: border-box;
    // flex-direction: column;
    // background-color: #ccc;
    justify-content: space-between;
    padding: 30px 40px;
    .eventItem{
      flex: 0.2;
      display: flex;
      justify-content: space-between;
      border-radius: 10px;
      // background-color: aqua;
      color: white;
      cursor: pointer;
    }
  }
  .eventIcon{
    text-align: center;
    flex: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 80px;
  }
  .eventCount{
    flex: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 34px;
  }
  .dataBox{
    width: 100%;
    height: 600px;
    display: flex;
    justify-content: space-between;
    .dataLeft{
      flex: 35%;
      height: 250px;
      box-sizing: border-box;
      // 设置此样式，当父元素缩小后不会排挤子元素
      flex-shrink: 0;
      border: 1px solid #ccc;
      .dataHead{
        display: flex;
        height: 40px;
        line-height: 40px;
        background-color: #F5F7FA;
        
        .checkedNav{
          padding: 0 20px;
          color: #40A2FF;
          background-color: #fff;
          cursor: pointer;
        }
        .noCheckedNav{
          color: #C0ADA1;
          padding: 0 20px;
          cursor: pointer;
        }
      }
      .hiddenDanger{
        height: 100%;
        padding: 20px 20px;
      }
    }
    .dataRight{
      flex: 50%;
      display: flex;
      flex-direction: column;
      margin-left: 20px;
      box-shadow: 0 0 10px rgba(0,0,0,0.3);
      .head{
        height: 60px;
        padding-left: 20px;
        line-height: 60px;
        border-bottom: 1px solid #ccc;
      }
      #main{
        flex: 1;
        padding-right: 20px;
      }
    }
    .addHiddenDanger{
      width: 150px;
      text-align: center;
      line-height: 50px;
      height: 50px;
      border-radius: 50px;
      background-color: #409EFF;
      color: #fff;
      margin-bottom: 80px;
      cursor: pointer;
    }
  }
  #main1{
    width: 900px;
    height: 600px;
    margin: auto;
    margin-top: 100px;
    background-color: red;
  }
</style>